# https://leetcode-cn.com/problems/can-make-arithmetic-progression-from-sequence/

from typing import List

from sqlalchemy import false


class Solution:
    def canMakeArithmeticProgression(self, arr: List[int]) -> bool:
        arr.sort()
        d = -1
        for num1, num2 in zip(arr[0:-1], arr[1:]):
            if d==-1:
                d = num2 - num1
            elif num2 - num1 != d:
                return False
        return True